#!/usr/bin/python

def Bigger(x, y):
  if x > y:
    return x
  else:
    return y

def Biggest(a, b, c):
  return Biggest1(a, b, c)

def Biggest1(a, b, c):
  return Bigger(a, Bigger(b, c))

def Biggest2(a, b, c):
  return Bigger(b, Bigger(a, c))

def Smaller(a, b):
  if a < b:
    return a
  else:
    return b

def Smallest(a, b, c):
  return Smaller(a, Smaller(b, c))

def Median(a, b, c):
  biggest = Biggest(a, b, c)
  smallest = Smallest(a, b, c)
  if a == biggest:
    if b == smallest:
      return c
    else:
      return b
  elif b == biggest:
    if a == smallest:
      return c
    else:
      return a
  elif c == biggest:
    if a == smallest:
      return b
    else:
      return a

def Median2(a, b, c):
  biggest = Biggest(a, b, c)
  if a == biggest:
    return Bigger(b, c)
  elif b == biggest:
    return Bigger(a, c)
  else:
    return Bigger(a, b)

def main():
  print Median(1, 2, 3)

if __name__ == '__main__':
  main()
